<%@page contentType="text/html;charset=UTF-8"%>
<%@include file="/common/taglibs.jsp"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>建设工程检测协议书</title>
<script type="text/javascript">
	$(document).ready(function() {
		$("#addDocument").click(function() {
			ProInfoList();
		});

	});
	function setPorjectId(projectId) {
		window.location.href = "${ctx}/contract/according!input.action?projectId="
				+ projectId;
	}
	function close() {
		$.window.closeAll();
	}
	function load() {
		location.reload();
	}
	function qianding(id) {
		$.window.prepare({
			dock : 'left' // change the dock direction: 'left', 'right', 'top', 'bottom'
		});
		$.window({
			title : "签订情况",
			showFooter : false,
			maximizable : true,
			bookmarkable : false,
			width : 700,
			height : 242,
			resizable : false,
			showRoundCorner : true,
			createRandomOffset : {
				x : -1,
				y : -1
			},
			modalOpacity : 0.5,
			showModal : true,
			closable : true,
			minimizable : false,
			url : appConfig.contPath + "/contract/document!qianding.action?id="
					+ id
		});
	}
</script>
</head>
<body>
	<form action="${ctx }/contract/document.action" method="post"
		class="yform" id="mainForm">
		<div id="content">
			<table class="contentTable">
				<tr>
					<th>序号</th>
					<th>工程名称</th>
					<th>签订状态</th>
					<th>签订日期</th>
					<th>操作</th>
				</tr>
				<c:forEach items="${page.result }" var="doc" varStatus="status">
					<tr>
						<td>${page.first+status.index}</td>
						<td><pt:labels type="proj" argument1="${doc.pid }"
								single="true"></pt:labels></td>
						<td><c:if test="${doc.sign == '0' }">未签定</c:if> <c:if
								test="${doc.sign != '0' }">已签定</c:if></td>
						<td><fmt:formatDate pattern="yyyy-MM-dd"
								value="${doc.signTime}"></fmt:formatDate></td>
						<td><a href="javascript:qianding('${doc.id }');">签订</a> <a
							href="${ctx }/contract/inventor!view.action?cid=${doc.id}">查看</a>
							<c:if test="${doc.status == '01' || doc.status == null }">
								<a href="${ctx }/contract/according!input.action?cid=${doc.id}">修改</a>
								<a href="${ctx}/contract/document!login.action?id=${doc.id}">上报</a>
							</c:if> <c:if test="${doc.status != '01' && doc.status != null }">
								<a href="${ctx}/contract/document!judge.action?id=${doc.id}">处理</a>
							</c:if></td>
					</tr>
				</c:forEach>
			</table>
		</div>
		<jsp:include page="/common/page.jsp" flush="true" />
		<div class="type-button">
			<input type="button" id="addDocument" class="add" value="新增" />
		</div>
	</form>
</body>
</html>